package com.manong.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.manong.entity.Department;
import com.manong.vo.query.DepartmentQueryVo;

import java.util.List;

/**
 * 服务类
 * @author 李茂鑫
 * @Date 2025/1/8 11:49
 * @Descripition
 */
public interface DepartmentService extends IService<Department> {
    /**
     * 查询部门列表
     * @param departmentQueryVo 查询条件
     * @return
     */
    List<Department>findDepartmentList(DepartmentQueryVo departmentQueryVo);

    /**
     * 查询上级部门列表
     * @return
     */
    List<Department>findParentDepartment();

    /**
     * 判断部门下是否有子部门
     * @param id
     * @return
     */
    boolean hasChildrenOfDepartment(Long id);

    /**
     * 判断部门下是否有用户
     * @param id
     * @return
     */
    boolean hashUserOfDepartment(Long id);

    boolean hasUserOfDepartment(Long id);
}
